// stores/users.js
import { defineStore } from 'pinia';
import {
	ref,
	reactive
} from 'vue';

export const useUserStore = defineStore('userId', () => {
	// 登录状态
	const token = ref('');
	const userInfo = ref({
		token: null,
		info: {},
		mobile: null
	});
	const orderNo2533 = ref();
	const orderTime2533 = ref();
	const orderNo2534 = ref();
	const orderMobile2534 = ref();
	const orderTime2534 = ref();
	const orderNo2535 = ref();
	const orderTime2535 = ref();
	const orderNo2561 = ref();
	const orderTime2561 = ref();
	const orderTime = ref();
	const orderTimeMid = ref();
	const midPageData = reactive({ url: '', timer: '', orderNo: '',setTimer:'',orderTime:'' });
	return {
		token,
		userInfo,
		orderNo2533,
		orderTime2533,
		
		orderNo2534,
		orderTime2534,
		orderMobile2534,
		
		orderNo2535,
		orderTime2535,
		
		orderNo2561,
		orderTime2561,
		orderTime,
		orderTimeMid,
		midPageData,
		
	};
}, {
	persist: {
		paths: ['token', 'userInfo', 'orderNo2533', 'orderNo2534', 'orderNo2535',
			'orderTime2533', 'orderTime2534', 'orderTime2535', 'orderNo2561', 
			'orderTime2561', 'orderTimeMid','midPageData','orderMobile2534'
		],
	},
});